/**
 * Twitter website CSS selector constants
 * Used to locate elements on the page
 */
export const SELECTORS = {
  LOGIN: {
    USERNAME_INPUT: 'input[autocomplete="username"]',
    PASSWORD_INPUT: 'input[type="password"]',
    NEXT_BUTTON: 'div[role="button"]:has-text("Next")',
    LOGIN_BUTTON: 'div[role="button"]:has-text("Log in")',
    NEXT_BUTTON_ALT: '[data-testid="login-next-button"]',
    LOGIN_BUTTON_ALT: '[data-testid="login-submit-button"]',
  },
  HOME: {
    TIMELINE: '[data-testid="primaryColumn"]',
    TRENDING: '[data-testid="sidebarColumn"]',
    TWEET_COMPOSER: '[data-testid="tweetButtonInline"]',
  },
  TIMELINE: {
    TWEET: '[data-testid="tweet"]',
    TWEET_TEXT: '[data-testid="tweetText"]',
    TWEET_TIME: 'time',
    LIKE_BUTTON: '[data-testid="like"]',
    RETWEET_BUTTON: '[data-testid="retweet"]',
    REPLY_BUTTON: '[data-testid="reply"]',
    AUTHOR_LINK: '[data-testid="User-Name"] a',
    AUTHOR_NAME: '[data-testid="User-Name"] a div span',
    AUTHOR_USERNAME: '[data-testid="User-Name"] a div div span',
    TWEET_STATS: '[data-testid="tweet"] [role="group"]',
    REPLY_COUNT: '[data-testid="reply"] span span',
    RETWEET_COUNT: '[data-testid="retweet"] span span',
    LIKE_COUNT: '[data-testid="like"] span span',
    VIEW_COUNT: '[data-testid="tweet"] [data-testid="app-text-transition-container"] span span',
    MEDIA_CONTAINER: '[data-testid="tweetPhoto"]',
    VIDEO_CONTAINER: '[data-testid="videoPlayer"]',
    TWEET_LINK: 'a[aria-label*="posted"]',
    TWEET_ID_CONTAINER: 'a[href*="/status/"]',
  },
  PROFILE: {
    FOLLOW_BUTTON: '[data-testid="followButton"]',
    UNFOLLOW_BUTTON: '[data-testid="unfollowButton"]',
    DISPLAY_NAME: '[data-testid="UserName"] div span',
    USERNAME: '[data-testid="UserName"] div span:has-text("@")',
    BIO: '[data-testid="UserDescription"]',
    STATS: '[data-testid="UserProfileStats"]',
    FOLLOWING_STAT: '[href$="/following"]',
    FOLLOWERS_STAT: '[href$="/followers"]',
    AVATAR: '[data-testid="UserAvatar-Container"] img',
    BANNER: '[data-testid="UserProfileHeader_Items"] img',
    JOIN_DATE: '[data-testid="UserProfileHeader_Items"] span:has-text("Joined")',
    LOCATION: '[data-testid="UserProfileHeader_Items"] span:has-text("Location")',
    WEBSITE: '[data-testid="UserProfileHeader_Items"] a[href^="https"]',
    VERIFIED_BADGE: '[data-testid="icon-verified"]',
  },
  COMPOSE: {
    TWEET_INPUT: '[data-testid="tweetTextarea_0"]',
    TWEET_BUTTON: '[data-testid="tweetButtonInline"]',
    MEDIA_BUTTON: '[data-testid="imageOrGifButton"]',
    POLL_BUTTON: '[data-testid="createPollButton"]',
    EMOJI_BUTTON: '[data-testid="emojiButton"]',
    SCHEDULE_BUTTON: '[data-testid="scheduleButton"]',
  },
  SEARCH: {
    INPUT: '[data-testid="SearchBox_Search_Input"]',
    RESULT_TAB: '[role="tablist"] [role="presentation"]',
    PEOPLE_TAB: '[role="tab"]:has-text("People")',
    LATEST_TAB: '[role="tab"]:has-text("Latest")',
    TOP_TAB: '[role="tab"]:has-text("Top")',
    SEARCH_FILTERS: '[data-testid="searchFiltersButton"]',
  },
  NOTIFICATIONS: {
    ITEM: '[data-testid="cellInnerDiv"]',
    MENTION: '[data-testid="notification"]',
    FOLLOW: '[data-testid="notification"]',
    LIKE: '[data-testid="notification"]',
    RETWEET: '[data-testid="notification"]',
  },
  MESSAGES: {
    CONVERSATION: '[data-testid="conversation"]',
    MESSAGE_INPUT: '[data-testid="dmComposerTextInput"]',
    SEND_BUTTON: '[data-testid="dmComposerSendButton"]',
  },
}
